<div class="row row-cards row-deck">
  <div class="col-12">
    <div class="card">
      <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
        <thead>
          <tr>
            <th>结算金额</th>
            <th>结算时间</th>
            <th>结算操作人</th>
            <th>状态</th>
            <th>备注</th>
            <th class="text-center">
              <a href="<%= new_shop_settle_path %>">申请结算</a>
            </th>
          </tr>
        </thead>
        <tbody>
          <% @settles.each do |settle| %>
            <tr>
              <td>
                <div><%= settle.fee %></div>
              </td>
              <td>
                <div><%= formattime(settle.created_at, unit: "hour") %></div>
              </td>
              <td>
                <div><%= settle.shoper.phone %></div>
              </td>
              <td>
                <div><%= i18n_enum settle, :state %></div>
              </td>
              <td>
                <div><%= settle.remark %></div>
              </td>
              <td class="text-center">
                <div class="item-action dropdown">
                  <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
                  <div class="dropdown-menu dropdown-menu-right">
                    <%= link_to shop_settle_path(settle), method: :delete, class: 'dropdown-item' do %>
                      <i class="dropdown-icon fe fe-edit-2"></i> 取消结算 
                    <% end %>
                  </div>
                </div>
              </td>
            </tr>
          <% end %>
        </tbody>
      </table>
      <div>
        <%= paginate @settles %>
      </div>
    </div>
  </div>
</div>